package com.ss.android.article.base.feature.model;

import org.json.JSONObject;

public final class DownloadAppAd extends AppAd {
    public int preloadWeb;
    private JSONObject videoInfo;
    public int rate = -1;
    public String downloadCount;
    public String appSize;
    public int displaySubtype;
    public String title;
    public int width;
    public int height;
    public int videoDuration;
    public String videoId;
    public String coverUrl;

    public DownloadAppAd(int arg2) {
        super(arg2);
    }

    public final void initWithJO(JSONObject jo) {
        super.initWithJO(jo);
        this.rate = jo.optInt("rate");
        this.downloadCount = jo.optString("download_count");
        this.appSize = jo.optString("app_size");
        this.displaySubtype = jo.optInt("display_subtype");
        this.videoInfo = jo.optJSONObject("video_info");
        this.title = jo.optString("title");
        this.preloadWeb = jo.optInt("preload_web");
        if (this.videoInfo != null) {
            try {
                this.width = this.videoInfo.optInt("width");
                this.height = this.videoInfo.optInt("height");
                this.videoDuration = this.videoInfo.optInt("video_duration");
                this.videoId = this.videoInfo.optString("video_id");
                this.coverUrl = this.videoInfo.optString("cover_url");
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}

